By default, CC cannot know which virtual libraries a book is in, because that information is not part of the metadata for a book. The solution to the problem is to add a custom column to the book listing the virtual libraries the book is in. Once you have done that, then you can add that custom column to CC's grouping drawer, and long-press on a virtual library name in grouping to see only the books in that VL.
There are two ways to get the list of virtual libraries into a custom column:
A) A manual method that has almost no impact on calibre performance:
2) In calibre, if needed create the custom column for the plugin(s) to use. I assume that the lookup name is "virtlibs" (without the quotes).
3) If using the GUI version, run the plugin.
B) A more automatic method that might cause calibre to run slowly:
1) In calibre, create a new custom column with type "Column built from other columns, behaves like tags". For this example I assume that the lookup name is "virtlibs" (without the quotes). This column will contain the list of virtual library names that the book is in. It is not necessary to check the box "Show in tag browser". The template to use is
2) Verify that the new column contains the names of the virtual libraries for each book. If it does not, check that the template box contains the correct template.
In both cases, configure CC as follows:
1) Connect to calibre as a wireless device. Calibre will resend metadata for all the books on your device so that the new column is available to CC.
2) In CC, add the virtlibs column (created in one of the "Methods" above) to the grouping drawer. Go to CC's settings (tap the 3-dots then choose Settings). Open the "Grouping Drawer" category and tap "Group/sort on custom columns". Choose the lookup name for the virtual libraries column, which in this example is "#virtlibs" (note the # character). If you are creating groups for more than one column, the lookup names must be separated by commas. Press OK
3) You will see a message saying "Making changes in database", then a dialog telling you that the database is being updated. This process may take some time, around 1 second for every 3 or 4 books on your device. The grouping drawer will be disabled while this process is running.
When the database upgrade is finished, grouping will be re-enabled. You will see #virtlibs as a choice in the grouping drawer. Tap that line and you will see the virtual libraries. Long-press a virtual library and CC will show books only from that VL.